Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(247)

Delta Between Two Patch Sets: Src/GoogleApis/Apis/[Media]/Download/MediaDownloader.cs

Issue 12566043: Issue 369: Change default behavior of an HTTP request (Closed) Base URL: https://google-api-dotnet-client.googlecode.com/hg/
Left Patch Set: Created 11 years, 3 months ago
Right Patch Set: Miceli review Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Src/GoogleApis/Apis/Services/BaseClientService.cs ('k') | Src/GoogleApis/Apis/[Media]/Upload/ResumableUpload.cs » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 Copyright 2013 Google Inc 2 Copyright 2013 Google Inc
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at 6 You may obtain a copy of the License at
7 7
8 http://www.apache.org/licenses/LICENSE-2.0 8 http://www.apache.org/licenses/LICENSE-2.0
9 9
10 Unless required by applicable law or agreed to in writing, software 10 Unless required by applicable law or agreed to in writing, software
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 /// <param name="status">The status of the download.</param> 71 /// <param name="status">The status of the download.</param>
72 /// <param name="bytes">The number of bytes received so far.</param> 72 /// <param name="bytes">The number of bytes received so far.</param>
73 public DownloadProgress(DownloadStatus status, long bytes) 73 public DownloadProgress(DownloadStatus status, long bytes)
74 { 74 {
75 Status = status; 75 Status = status;
76 BytesDownloaded = bytes; 76 BytesDownloaded = bytes;
77 } 77 }
78 78
79 /// <summary>Constructs a new progress instance.</summary> 79 /// <summary>Constructs a new progress instance.</summary>
80 /// <param name="exception">An exception which occurred during the d ownload.</param> 80 /// <param name="exception">An exception which occurred during the d ownload.</param>
81 /// <param name="bytesSent">The number of bytes received before the exception occurred.</param> 81 /// <param name="bytes">The number of bytes received before the exce ption occurred.</param>
82 public DownloadProgress(Exception exception, long bytes) 82 public DownloadProgress(Exception exception, long bytes)
83 { 83 {
84 Status = DownloadStatus.Failed; 84 Status = DownloadStatus.Failed;
85 BytesDownloaded = bytes; 85 BytesDownloaded = bytes;
86 Exception = exception; 86 Exception = exception;
87 } 87 }
88 88
89 /// <summary>Gets or sets the status of the download.</summary> 89 /// <summary>Gets or sets the status of the download.</summary>
90 public DownloadStatus Status { get; private set; } 90 public DownloadStatus Status { get; private set; }
91 91
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 catch (Exception ex) 236 catch (Exception ex)
237 { 237 {
238 var progress = new DownloadProgress(ex, currentRequestFirstByteP os); 238 var progress = new DownloadProgress(ex, currentRequestFirstByteP os);
239 UpdateProgress(progress); 239 UpdateProgress(progress);
240 return progress; 240 return progress;
241 } 241 }
242 } 242 }
243 } 243 }
244 } 244 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b